Skip to content

Conversation

@NicolaF
Copy link

@NicolaF NicolaF commented Dec 19, 2016

How It works:

  • Prefix all data sent to EvalWorker with a 1 byte command identifier can be either CMD_EVAL ("\0") or CMD_COMPLETE ("\1").
  • completiion function sends CMD_COMPLETE . substr($info['line_buffer'], 0, $info['end']) to eval worker
  • eval worker sends back completions as a JSON blob.

Completion function inspired from https://github.com/erikdubbelboer/php-repl/blob/master/repl.php

Remove some dead code, keep eval worker alive if evaluation fails.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant